package org.ejc.struts.registration;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.ejc.tech.combo.ComboConstants;
import org.ejc.tech.combo.ComboMgr;


/**
 * @struts.action path="/struts/register/conventionRegistrationAction" scope="request"
 *                parameter="methodToCall" name="conventionRegistrantForm"
 *                validate="false"
 *                input="/struts/register/getRegistrantInfo.jsp"
 * 
 * @struts.action-forward name="preCreateSuccess" path="/struts/register/getRegistrantInfo.jsp"
 * @struts.action-forward name="createSuccess" path="/struts/register/getRegistrantInfo.jsp"
 * 
 * 
 * @author zac
 * 
 * TODO To change the template for this generated type comment go to Window -
 * Preferences - Java - Code Style - Code Templates
 */
public class ConventionRegistrationAction extends DispatchAction implements ComboConstants{
	
private static Logger log = Logger.getLogger(RegistrationAction.class); 
	
	/**
	 * PreCreate Action.<p/>
	 * This is called when the user clicks on "create new registrant" <p/>
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return
	 * @throws Exception
	 */
	public final ActionForward preCreate(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) throws Exception {
		if(log.isDebugEnabled()){
			log.debug("In Precreate of ConventionRegistrant Action!");
		}
		
		request.setAttribute("accomodationList",ComboMgr.getInstance().getComboContents(ACCOMODATION_TYPE,request.getLocale()));
		request.setAttribute("additionalInfoListing",ComboMgr.getInstance().getComboContents(ADDITIONAL_INFO,request.getLocale()));
		
		return mapping.findForward("preCreateSuccess");
	}
	
	
	void t(){
		//ConventionRegistrant o=null;
		
	}
		
	
	

}
